<?php

namespace Application\Form;
use Zend\Form\Form;
use Zend\Form\Element\DateTimeLocal;


class InscriptionForm extends Form {

	public function __construct(){
		
		parent::__construct('inscription_form');
		
		$this->setAttribute('method','post');
		
		$this->add(array(
			'name' =>'nom',
			'attributes' =>array(
					'type' =>'text',
					),
			 'options' => array(
			 		'label' =>_('Nom'),
			 )
			));
		
		$this->add(array(
				'name' =>'prenom',
				'attributes'=>array(
						'type' =>'text',),
						'options'=>array(
								'label'=>_('Prénom'),
								)	
		));
		
		$this->add(array(
				'name' =>'fonction',
				'attributes'=>array(
						'type'=>'text',),
						'options'=>array(
								'label'=>_('Fonction')
				)
		));
		
		$this->add(array(
				'name' =>'entreprise',
				'attributes'=>array(
						'type'=>'text',),
				'options'=>array(
						'label'=>_('Entreprise')
				)
		));
		
		$this->add(array(
				'name' =>'adresse',
				'attributes'=>array(
						'type'=>'text',),
				'options'=>array(
						'label'=>_('Adresse')
				)
		));
		
		$this->add(array(
			'name' =>'email',
			'attributes' =>array(
					'type'=>'text',
			),
			'options' =>array(
				'label' =>_('Email'),
			)
		));
		
		$this->add(array(
				'name' => 'telephone',
				'attributes' => array(
						'type'  => 'text',
				),
				'options' => array(
						'label' => _('Téléphone'),
				),
		));
		
		$this->add(array(
				'name' => 'login',
				'attributes' => array(
						'type'  => 'text',
				),
				'options' => array(
						'label' => _('Login'),
				),
		));
		
		$this->add(array(
				'name' => 'password',
				'attributes' => array(
						'type'  => 'password',
				),
				'options' => array(
						'label' => _('Mot de passe'),
				),
		));
		
		$this->add(array(
				'name' => 'password2',
				'attributes' => array(
						'type'  => 'password',
				),
				'options' => array(
						'label' => _('Confirmation du mot de passe'),
				),
		));
		
		$this->add(array(
				'name' => 'motif',
				'attributes' => array(
						'type'  => 'text',
				),
				'options' => array(
						'label' => _('Objet d\'inscription'),
				),
		));
		
		$this->add(array(
				'type' => 'Zend\Form\Element\Select',
				'name' => 'motif',
				'options' => array(
						'label' => _('Objet d\'inscription'),
						'value_options' => array(
								'1' => 'Objet de votre inscription',
								'Forum' => 'Forum',
								'Client' => 'Client'
						),
				),
				'attributes' => array(
						'value' => '1' //set selected to '1'
				)
		));
		
		$this->add(array(
				'name' => 'date_inscrip',
				'attributes' => array(
						'type'  => 'Zend\Form\Element\DateTimeLocal',
						
						'value' =>  date("Y-m-d"),
				
				),
				'options' => array(
						'label' => _('Date d\'inscription'),
				),
		));
		
		$this->add(array(
				'name' => 'submit',
				'attributes' => array(
						'type'  => 'submit',
						'width' => '30px',
						'value' => 'Envoyer',
						'id' => 'submitbutton',
				),
		));
	}
}

?>